﻿using System;

namespace SmartMathLibrary.Storage
{
    /// <summary>
    /// Supports a storage point, which may be included by a storage. 
    /// </summary>
    public interface IStoragePoint : IComparable
    {
        /// <summary>
        /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
        /// </summary>
        /// <param name="obj">An object to compare with this instance.</param>
        /// <returns>
        /// A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
        /// Value
        /// Meaning
        /// Less than zero
        /// This instance is less than <paramref name="obj"/>.
        /// Zero
        /// This instance is equal to <paramref name="obj"/>.
        /// Greater than zero
        /// This instance is greater than <paramref name="obj"/>.
        /// </returns>
        /// <exception cref="T:System.ArgumentException">
        /// 	<paramref name="obj"/> is not the same type as this instance.
        /// </exception>
        new int CompareTo(object obj);

        /// <summary>
        /// Indicates whether this instance and a specified object are equal.
        /// </summary>
        /// <param name="obj">Another object to compare to.</param>
        /// <returns>
        /// true if <paramref name="obj"/> and this instance are the same type and represent the same value; otherwise, false.
        /// </returns>
        bool Equals(object obj);

        /// <summary>
        /// Returns the fully qualified type name of this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> containing a fully qualified type name.
        /// </returns>
        string ToString();

        /// <summary>
        /// Gets or sets the x value of the storage point.
        /// </summary>
        /// <value>The x value of the storage point.</value>
        double X { get; set; }

        /// <summary>
        /// Gets or sets the y value of the storage point.
        /// </summary>
        /// <value>The y value of the storage point.</value>
        double Y { get; set; }
    }
}